﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Logon.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="CourseSystem.Stat" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    最近访问30条IP
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <tr>
        <td style="background-color: White">
            <div id="listDiv">
                <table width="100%" border="0" cellpadding="4" cellspacing="1" class="table03">
                    <tr class="box06">
                        <td width="20%" align="center">
                            序号
                        </td>
                        <td width="40%" align="center">
                            IP地址
                        </td>
                        <td width="40%" align="center">
                            最近访问时间
                        </td>
                    </tr>
                    <% int i = 1;
                       var model = IpStat.GetLastIp();
                       foreach (var item in model)
                       {
                           if (i % 2 != 0)
                           {%>
                    <tr class="box01">
                        <%}
           else
           { %>
                        <tr class="box02" onmouseover="this.className='bg3'" onmouseout="this.className='bg4'"
                            bgcolor="#FFFFFF">
                            <%} %>
                            <td height="27" align="center">
                                <%=i++ %>
                            </td>
                            <td align="center">
                                <%=item.Key%>
                            </td>
                            <td align="center">
                                <%=item.Value.ToString("yyyy-MM-dd HH:mm:ss")%>
                            </td>
                        </tr>
                        <%} %>
                </table>
            </div>
            <div>
                <%=Html.ActionLink("返回","Index") %></div>
        </td>
    </tr>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
